#include <iostream>

using namespace std;

int main()
{
	cout << "Hello World" << endl;
	cout << "Dude enter in a number and I'll do something with it!" << endl;
	int x;
	cin >> x;
	cout << "Dude you just entered " << x << " into the terminal! Wicked!" << endl;
	double upper, lower, m, b;
	cout << "Yo man, let's do some integration! Enter an upper bound!" << endl;
	cin >> upper;
	cout << "Dude wicked! Now enter in a lower bound!" << endl;
	cin >> lower;
	while (lower > upper){
		cout << "Dude, go back to elementary school man! Your math blows! Enter in a lower number for your lower limit!" << endl;
		cin >> lower;
	}
	cout << "Sweet man! Now, this is going to be a linear integration in the form y = mx + b. Enter input m first!" << endl;
	cin >> m;
	cout << "Dude you are the man! Now, enter in b!" << endl;
	cin >> b;
	cout << "Whoa! You correctly entered in all numbers! Now buckle your seatbelt bronco, we're about to calculate this sucker!" << endl;
	double upperEntered = (m / 2) * (upper * upper) + upper * b;
	double lowerEntered = (m / 2) * (lower * lower) + lower * b;
	double answer = upperEntered - lowerEntered;
	cout << "Holy moly! It looks like your answer is " << answer << "! That was one sweet calculation bro! Have a good day!" << endl;
	return 0;
}
